﻿using System;
using UnityEngine;

// Token: 0x02000124 RID: 292
[AddComponentMenu("RVP/C#/Input/Basic Input", 0)]
[DisallowMultipleComponent]
[RequireComponent(typeof(VehicleParent))]
public class BasicInput : VehicleInputController
{
	// Token: 0x06000562 RID: 1378 RVA: 0x00029682 File Offset: 0x00027882
	private void Start()
	{
		this.vp = base.GetComponent<VehicleParent>();
	}

	// Token: 0x06000563 RID: 1379 RVA: 0x00029690 File Offset: 0x00027890
	private void FixedUpdate()
	{
		this.vp.SetAccel(Input.GetAxis(ButtonInput.VerticalAxis));
		this.vp.SetBrake(Input.GetAxis(ButtonInput.VerticalAxis));
		this.vp.SetSteer(Input.GetAxis(ButtonInput.HorizontalAxis));
		this.vp.SetEbrake(Input.GetAxis(ButtonInput.Jump));
		this.vp.SetBoost(Input.GetButton(ButtonInput.Sprint));
	}

	// Token: 0x06000564 RID: 1380 RVA: 0x00029708 File Offset: 0x00027908
	private void OnDisable()
	{
		if (this.vp == null)
		{
			return;
		}
		this.vp.SetAccel(0f);
		this.vp.SetBrake(0f);
		this.vp.SetSteer(0f);
		this.vp.SetEbrake(0f);
		this.vp.SetBoost(false);
	}

	// Token: 0x04000773 RID: 1907
	private VehicleParent vp;
}
